<!--- My SQL 5.0 database connectivity... 	--->
<cfset dataSource = "MyAppMySQL" />
<cfset metaDataSource = "MyAppMySQL" />
<cfset dbEngine = 4 />										<!--- 1=MS Access, 2=MS SQL, 3=Oracle, 4=My SQL --->
<cfset dbType = "MySQL" />
<cfset dbVersion = "5" />
<cfset dbConcatStr = " + " />								<!--- || = Oracle, + = MS SQL, & = Ms Access, My SQL concat is a function --->
<cfset dbDate = " current_date() " />						<!---  1=date(), 2= toChar( sysDate, 101 ),3= to_date(sysdate), 4= current_date() --->
<cfset dbTime = " current_datetime() " />
<cfset dbDateTime = " current_datetime() " />				<!---  1=now(),2= getDate(),3= sysdate, 4= current_datetime() --->
<cfset tableSchema = "myApp" />


<cfset strMetaExceptionFile = "C:\ColdFusion8\wwwroot\dbCFC\config\dbMetaException.txt" />
<cfset strDBDataTypes = "C:\ColdFusion8\wwwroot\dbCFC\config\dbDataTypeException.txt" />
	

<!--- 
		Load the database bean into memory.
		We call the dbFunctions (generic) as this extends the dbProperties component which is our database bean
 --->

<cfset objDBProperties = CreateObject("component","org.hemtalreja.db.dbFunctions") />
<cfset objDBProperties.setDataSource(datasource) />
<cfset objDBProperties.setMetaDataSource(metaDatasource) />
<cfset objDBProperties.setDBConcatStr(dbConcatStr) />
<cfset objDBProperties.setDBEngine(dbEngine) />
<cfset objDBProperties.setDBType(dbType) />
<cfset objDBProperties.setDBVersion(dbVersion) />
<cfset objDBProperties.setDBDate(dbDate) />
<cfset objDBProperties.setDBTime(dbTime) />
<cfset objDBProperties.setDBDateTime(dbDateTime) />
<cfset objDBProperties.setTableSchema(tableSchema) />



<cfset objDBMetaExceptions = CreateObject("component","org.hemtalreja.db.dbMetaExceptions").init(strMetaExceptionFile) />
<cfset objDBDataTypes = CreateObject("component","org.hemtalreja.db.dbDataTypes") />

<cfset objDBMetaRetreiver = CreateObject("component","org.hemtalreja.db.dbMetaRetreiverGeneric").init(objDBMetaExceptions) />
<cfset objMetaLoader = CreateObject("component","org.hemtalreja.db.dbMetaLoader").init(objDBMetaRetreiver, objDBProperties) />

<cfset objDBReader = CreateObject("component","org.hemtalreja.db.dbReader").init(objDBProperties) />
<cfset objDBWriter = CreateObject("component","org.hemtalreja.db.dbWriter").init(objDBProperties, objDBDataTypes) />

<cfset objDB = CreateObject("component","org.hemtalreja.db.dbController").init(objDBProperties, objMetaLoader, objDBReader, objDBWriter) /> 


<!--- Save the objDB to Application Scope, if you are using a framework such as Model-Glue or Mach-II create this as a persistant object... --->
<!--- 
	<cflock scope="Application">
		<cfset Application.objDB = objDB />
	</cflock>
 --->
